package com.gitee.ywj1352.learning.ag.zuul.utils;

import java.io.Serializable;

/**
 * Created by ywj on 2018/2/12.
 */
public class JwtInfo implements Serializable{
    private String userName;

    private String userId;

    private String name;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        JwtInfo jwtInfo = (JwtInfo) o;

        if (!userName.equals(jwtInfo.userName)) return false;
        return userId.equals(jwtInfo.userId);

    }

    @Override
    public int hashCode() {
        int result = userName.hashCode();
        result = 31 * result + userId.hashCode();
        return result;
    }
}
